<?php

namespace appcode\enum;

require_once("IEnumBaseClass.php");

class PageType implements IEnumBaseClass {
    const FrontPage = "frontpage";
    const Page = "page";
    const Object = "object";
    const Contact = "contact";

    public static function GetArray() {
        return array(1 => self::FrontPage, 2 => self::Page, 3 => self::Object, 4 => self::Contact);
    }

    public static function GetById($id){
        return EnumBaseClassHelper::GetById(self::GetArray(), $id);
    }

    public static function GetByName($name) {
        return EnumBaseClassHelper::GetByName(self::GetArray(), $name);
    }

    public static function GetDefaultId() {
        return EnumBaseClassHelper::GetDefaultId(self::GetArray(), self::GetDefaultName());
    }

    public static function GetDefaultName() {
        return self::Page;
    }
}